<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilnvm: XilNvm Utils APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilnvm
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xnvm__util__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilNvm Utils APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga05857cc7a1c346b57ab04e5f1fb0edb5"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga05857cc7a1c346b57ab04e5f1fb0edb5">XNvm_AesCrcCalc</a> (const u32 *Key)</td></tr>
<tr class="memdesc:ga05857cc7a1c346b57ab04e5f1fb0edb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function calculates CRC of AES key.  <a href="#ga05857cc7a1c346b57ab04e5f1fb0edb5">More...</a><br/></td></tr>
<tr class="separator:ga05857cc7a1c346b57ab04e5f1fb0edb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga43a467daea1ce3c434d0c01e3657c0a9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga43a467daea1ce3c434d0c01e3657c0a9">XNvm_EfuseCheckAesKeyCrc</a> (u32 CrcRegOffSet, u32 CrcDoneMask, u32 CrcPassMask, u32 Crc)</td></tr>
<tr class="memdesc:ga43a467daea1ce3c434d0c01e3657c0a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs the CRC check of AES key/User0 key/User1 key.  <a href="#ga43a467daea1ce3c434d0c01e3657c0a9">More...</a><br/></td></tr>
<tr class="separator:ga43a467daea1ce3c434d0c01e3657c0a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8e96ff615b644f9f920a0f0e94f5da0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#gaf8e96ff615b644f9f920a0f0e94f5da0">XNvm_ZeroizeAndVerify</a> (u8 *DataPtr, const u32 Length)</td></tr>
<tr class="memdesc:gaf8e96ff615b644f9f920a0f0e94f5da0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to zeroize the memory.  <a href="#gaf8e96ff615b644f9f920a0f0e94f5da0">More...</a><br/></td></tr>
<tr class="separator:gaf8e96ff615b644f9f920a0f0e94f5da0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b8d44122a9957c29ed1be2574a53aed"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga0b8d44122a9957c29ed1be2574a53aed">XNvm_EfuseReadReg</a> (u32 BaseAddress, u32 RegOffset)</td></tr>
<tr class="memdesc:ga0b8d44122a9957c29ed1be2574a53aed"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads the given register.  <a href="#ga0b8d44122a9957c29ed1be2574a53aed">More...</a><br/></td></tr>
<tr class="separator:ga0b8d44122a9957c29ed1be2574a53aed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64ca5266a4e90002294937021465135a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga64ca5266a4e90002294937021465135a">XNvm_EfuseWriteReg</a> (u32 BaseAddress, u32 RegOffset, u32 Data)</td></tr>
<tr class="memdesc:ga64ca5266a4e90002294937021465135a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function writes the value into the given register.  <a href="#ga64ca5266a4e90002294937021465135a">More...</a><br/></td></tr>
<tr class="separator:ga64ca5266a4e90002294937021465135a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3024ec2e49b24a72d30ffd6ca24fd056"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga3024ec2e49b24a72d30ffd6ca24fd056">XNvm_EfuseLockController</a> (void)</td></tr>
<tr class="memdesc:ga3024ec2e49b24a72d30ffd6ca24fd056"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function locks the eFUSE Controller to prevent accidental writes to eFUSE controller registers.  <a href="#ga3024ec2e49b24a72d30ffd6ca24fd056">More...</a><br/></td></tr>
<tr class="separator:ga3024ec2e49b24a72d30ffd6ca24fd056"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c7176dc69fd682793be08de6c421d37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga9c7176dc69fd682793be08de6c421d37">XNvm_EfuseUnlockController</a> (void)</td></tr>
<tr class="memdesc:ga9c7176dc69fd682793be08de6c421d37"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function unlocks the eFUSE Controller for writing to its registers.  <a href="#ga9c7176dc69fd682793be08de6c421d37">More...</a><br/></td></tr>
<tr class="separator:ga9c7176dc69fd682793be08de6c421d37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4e019d9cd1db1fc71ae3b17f615eb8a3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga4e019d9cd1db1fc71ae3b17f615eb8a3">XNvm_EfuseSetupController</a> (<a class="el" href="group__xnvm__efuse__server__apis.html#gaf5262e07dfefff15534093f7f3d24fde">XNvm_EfuseOpMode</a> Op, <a class="el" href="group__xnvm__efuse__server__apis.html#ga626bd515d5b319991d9b6b337ac3eafa">XNvm_EfuseRdMode</a> RdMode)</td></tr>
<tr class="memdesc:ga4e019d9cd1db1fc71ae3b17f615eb8a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function setups eFUSE controller for given operation and read mode.  <a href="#ga4e019d9cd1db1fc71ae3b17f615eb8a3">More...</a><br/></td></tr>
<tr class="separator:ga4e019d9cd1db1fc71ae3b17f615eb8a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf9884d1248299bbcab9c2eb75f3c12d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#gadf9884d1248299bbcab9c2eb75f3c12d">XNvm_EfuseResetReadMode</a> (void)</td></tr>
<tr class="memdesc:gadf9884d1248299bbcab9c2eb75f3c12d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function disables Margin Read mode of eFUSE controller.  <a href="#gadf9884d1248299bbcab9c2eb75f3c12d">More...</a><br/></td></tr>
<tr class="separator:gadf9884d1248299bbcab9c2eb75f3c12d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0210acfa1906f9a6d4c462ca0c214552"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xnvm__util__apis.html#ga0210acfa1906f9a6d4c462ca0c214552">XNvm_EfuseDisableProgramming</a> (void)</td></tr>
<tr class="memdesc:ga0210acfa1906f9a6d4c462ca0c214552"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function disables programming mode of eFUSE controller.  <a href="#ga0210acfa1906f9a6d4c462ca0c214552">More...</a><br/></td></tr>
<tr class="separator:ga0210acfa1906f9a6d4c462ca0c214552"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga05857cc7a1c346b57ab04e5f1fb0edb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XNvm_AesCrcCalc </td>
          <td>(</td>
          <td class="paramtype">const u32 *&#160;</td>
          <td class="paramname"><em>Key</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function calculates CRC of AES key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Key</td><td>- Pointer to the key for which CRC has to be calculated.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CRC of AES key. </dd></dl>
<p>Process each bits of 32-bit Value</p>
<p>Get 5-bit from Address</p>
<p>Return CRC value upon success</p>

<p>References <a class="el" href="group__xnvm__bbram__server__apis.html#ga6ebc086461092546789c62ddbd362948">REVERSE_POLYNOMIAL</a>.</p>

</div>
</div>
<a class="anchor" id="ga43a467daea1ce3c434d0c01e3657c0a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseCheckAesKeyCrc </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>CrcRegOffSet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>CrcDoneMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>CrcPassMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Crc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function performs the CRC check of AES key/User0 key/User1 key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CrcRegOffSet</td><td>- Register offset of respective CRC register </td></tr>
    <tr><td class="paramname">CrcDoneMask</td><td>- Respective CRC done mask in status register </td></tr>
    <tr><td class="paramname">CrcPassMask</td><td>- Respective CRC pass mask in status register </td></tr>
    <tr><td class="paramname">Crc</td><td>- A 32 bit CRC value of an expected AES key.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS - On successful CRC check.<ul>
<li>XNVM_EFUSE_ERR_CRC_VERIFICATION - If AES boot key integrity check is failed.</li>
<li>XST_FAILURE - If AES boot key integrity check has not finished.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>For Calculating the CRC of the AES key use the <a class="el" href="group__xnvm__util__apis.html#ga05857cc7a1c346b57ab04e5f1fb0edb5" title="This function calculates CRC of AES key. ">XNvm_AesCrcCalc()</a> function. </dd></dl>
<p>Read the WR_LOCK_REG. Unlock the controller if read as locked</p>
<p>Write the crc to crcregoffset of eFuse_ctrl register</p>
<p>Wait for crcdone</p>
<p>Read efuse status register. If Crc is not done return XST_FAILURE</p>
<p>Return XNVM_EFUSE_ERR_CRC_VERIFICATION if Crc is not Pass. Return XST_SUCCESS upon crc pass and done</p>
<p>Lock efuse controller</p>

<p>References <a class="el" href="group__xilnvm__error__codes.html#gga00c7dbe244969a974957cec19d29f1fcaf2dffe88d7ba95da4c73e9b7b113b73f">XNVM_EFUSE_ERR_CRC_VERIFICATION</a>, <a class="el" href="group__xnvm__util__apis.html#ga3024ec2e49b24a72d30ffd6ca24fd056">XNvm_EfuseLockController()</a>, <a class="el" href="group__xnvm__util__apis.html#ga0b8d44122a9957c29ed1be2574a53aed">XNvm_EfuseReadReg()</a>, <a class="el" href="group__xnvm__util__apis.html#ga9c7176dc69fd682793be08de6c421d37">XNvm_EfuseUnlockController()</a>, and <a class="el" href="group__xnvm__util__apis.html#ga64ca5266a4e90002294937021465135a">XNvm_EfuseWriteReg()</a>.</p>

<p>Referenced by <a class="el" href="group__xnvm__versal__net__api__ids.html#gaa35f9d7952af5fccaed74ba5ae579191">XNvm_EfuseValidateAesKeyWriteReq()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#ga2aca2c53d5bb8c2d003e5a5e4097b884">XNvm_EfuseValidateDecOnlyRequest()</a>, and <a class="el" href="group__xnvm__efuse__server__apis.html#ga9e5e2abc14f75b9dc43d03284af58ade">XNvm_EfuseWriteUds()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0210acfa1906f9a6d4c462ca0c214552"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseDisableProgramming </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function disables programming mode of eFUSE controller. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS - if eFUSE programming is disabled successfully. XST_FAILURE - if there is a failure</dd>
<dd>
<ul>
<li>XST_SUCCESS If eFUSE programming is disabled successfully.</li>
<li>XST_FAILURE If there is a failure </li>
</ul>
</dd></dl>
<p>Read EFUSE_CFG_REG</p>
<p>disable eFuse program mode by writing EFUSE_CFG_REG register</p>
<p>Read EFUSE_CFG_REG</p>
<p>Disable eFuse program mode by writing EFUSE_CFG_REG register</p>

</div>
</div>
<a class="anchor" id="ga3024ec2e49b24a72d30ffd6ca24fd056"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseLockController </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function locks the eFUSE Controller to prevent accidental writes to eFUSE controller registers. </p>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS - eFUSE controller locked.<ul>
<li>XNVM_EFUSE_ERR_LOCK - Failed to lock eFUSE controller register access. </li>
</ul>
</dd></dl>
<p>Write lock Passcode in efuse control at offset of WR_LOCK_REG</p>
<p>Read the WR_LOCK_REG if above write was successful. Return XNVM_EFUSE_ERR_LOCK if not success</p>

<p>References <a class="el" href="group__xilnvm__error__codes.html#gga00c7dbe244969a974957cec19d29f1fca7a2222f3c14c0a6ae0440a002cd16bb2">XNVM_EFUSE_ERR_LOCK</a>, <a class="el" href="group__xnvm__util__apis.html#ga0b8d44122a9957c29ed1be2574a53aed">XNvm_EfuseReadReg()</a>, and <a class="el" href="group__xnvm__util__apis.html#ga64ca5266a4e90002294937021465135a">XNvm_EfuseWriteReg()</a>.</p>

<p>Referenced by <a class="el" href="group__xnvm__util__apis.html#ga43a467daea1ce3c434d0c01e3657c0a9">XNvm_EfuseCheckAesKeyCrc()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gace7f68b8a561aa12aed7ca066b9e28b2">XNvm_EfuseWrite()</a>, and <a class="el" href="group__xnvm__efuse__server__apis.html#ga420873a40f9a6f98373837d2fed08bb6">XNvm_EfuseWritePuf()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0b8d44122a9957c29ed1be2574a53aed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XNvm_EfuseReadReg </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>BaseAddress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>RegOffset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function reads the given register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BaseAddress</td><td>is the eFuse controller base address. </td></tr>
    <tr><td class="paramname">RegOffset</td><td>is the register offset from the base address.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The 32-bit value of the register. </dd></dl>

<p>Referenced by <a class="el" href="group__xnvm__efuse__server__apis.html#ga92376a9337883b186a9d6c888f7b7937">XNvm_EfuseCacheReload()</a>, <a class="el" href="group__xnvm__util__apis.html#ga43a467daea1ce3c434d0c01e3657c0a9">XNvm_EfuseCheckAesKeyCrc()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga34244e65ac073b03f29ee6a5672da34a">XNvm_EfuseCheckForTBits()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#ga074ef023f48a3f5164b0bf0f6d464d5c">XNvm_EfuseCheckZeros()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gaf62c488013d769df5cf16476d9dc04ed">XNvm_EfuseDisablePowerDown()</a>, <a class="el" href="group__xnvm__util__apis.html#ga0210acfa1906f9a6d4c462ca0c214552">XNvm_EfuseDisableProgramming()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga0f509a4e6fbf01df3a0a5cf4e5b1920a">XNvm_EfuseEnableProgramming()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#ga51762cb7925471e499cb19ff551039d7">XNvm_EfuseIsPufHelperDataEmpty()</a>, <a class="el" href="group__xnvm__util__apis.html#ga3024ec2e49b24a72d30ffd6ca24fd056">XNvm_EfuseLockController()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga15d0a0989ba278e28edaaf2cd9d7bf7f">XNvm_EfuseReadProtectionBits()</a>, <a class="el" href="group__xnvm__util__apis.html#gadf9884d1248299bbcab9c2eb75f3c12d">XNvm_EfuseResetReadMode()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gab18b9343a842ff2c9d533625bd4ffe9a">XNvm_EfuseSetReadMode()</a>, <a class="el" href="group__xnvm__util__apis.html#ga9c7176dc69fd682793be08de6c421d37">XNvm_EfuseUnlockController()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#gaa35f9d7952af5fccaed74ba5ae579191">XNvm_EfuseValidateAesKeyWriteReq()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#ga2aca2c53d5bb8c2d003e5a5e4097b884">XNvm_EfuseValidateDecOnlyRequest()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#ga989884994fda65f39b2f66ced494f83d">XNvm_EfuseValidateFipsInfo()</a>, <a class="el" href="group__xnvm__versal__net__api__ids.html#gacc264f1596fadaaf19db535bf527435a">XNvm_EfuseValidatePpkHashWriteReq()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gade779f5fb0d828586ba86b87492c0e50">XNvm_EfuseWriteCrc()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga3e5b32d4a7ec60464f46788458b5e67f">XNvm_EfuseWritePuf()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga9e5e2abc14f75b9dc43d03284af58ade">XNvm_EfuseWriteUds()</a>, and <a class="el" href="group__xnvm__versal__net__api__ids.html#ga05cd2825902d18394a7ba8c56c5342b6">XNvm_IsDmeModeEn()</a>.</p>

</div>
</div>
<a class="anchor" id="gadf9884d1248299bbcab9c2eb75f3c12d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseResetReadMode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function disables Margin Read mode of eFUSE controller. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS - if resetting read mode is successful. XST_FAILURE - if there is a failure</dd>
<dd>
<ul>
<li>XST_SUCCESS If resetting read mode is successful.</li>
<li>XST_FAILURE If there is a failure </li>
</ul>
</dd></dl>
<p>Read EFUSE_CFG_REG</p>
<p>Reset Read mode from margin read mode by writing the EFUSE_CFG_REG</p>
<p>Read EFUSE_CFG_REG register.</p>
<p>Reset read mode from margin read mode by writing the EFUSE_CFG_REG.</p>

</div>
</div>
<a class="anchor" id="ga4e019d9cd1db1fc71ae3b17f615eb8a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseSetupController </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__xnvm__efuse__server__apis.html#gaf5262e07dfefff15534093f7f3d24fde">XNvm_EfuseOpMode</a>&#160;</td>
          <td class="paramname"><em>Op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__xnvm__efuse__server__apis.html#ga626bd515d5b319991d9b6b337ac3eafa">XNvm_EfuseRdMode</a>&#160;</td>
          <td class="paramname"><em>RdMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function setups eFUSE controller for given operation and read mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Op</td><td>- Operation to be performed read/program(write). </td></tr>
    <tr><td class="paramname">RdMode</td><td>- Read mode for eFUSE read operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS - eFUSE controller setup for given op.<ul>
<li>XNVM_EFUSE_ERR_UNLOCK - Failed to unlock eFUSE controller register access.</li>
</ul>
</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Op</td><td>- Operation to be performed read/program(write). </td></tr>
    <tr><td class="paramname">RdMode</td><td>- Read mode for eFUSE read operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS eFUSE controller setup for given op.</li>
<li>XNVM_EFUSE_ERR_UNLOCK Failed to unlock eFUSE controller register access.</li>
<li>XST_FAILURE If eFUSE controller is not unlocked</li>
<li>XNVM_EFUSE_ERR_PGM_TBIT_PATTERN If TBITS pattern is not matched with the expected value. </li>
</ul>
</dd></dl>
<p>Unlock eFuse controller to write into eFuse registers</p>
<p>Set Read mode</p>
<p>Initialize eFuse Timers</p>
<p>Enable programming of Xilinx reserved eFuse</p>
<p>Check for T bits enabled</p>
<p>Unlock eFuse controller to write into eFuse registers.</p>
<p>Disable power down mode and set reference clock to eFuse.</p>
<p>Set read mode.</p>
<p>Initialize eFuse Timers.</p>
<p>Enable programming of Xilinx reserved eFuse.</p>
<p>Check for T bits for the expected pattern.</p>

</div>
</div>
<a class="anchor" id="ga9c7176dc69fd682793be08de6c421d37"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_EfuseUnlockController </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function unlocks the eFUSE Controller for writing to its registers. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS - eFUSE controller locked. XNVM_EFUSE_ERR_UNLOCK - Failed to unlock eFUSE controller register access. </dd></dl>
<p>Write unlock Passcode in efuse control at offset of WR_LOCK_REG</p>
<p>Read the WR_LOCK_REG if above write was successful. Return XNVM_EFUSE_ERR_UNLOCK if not success</p>

<p>References <a class="el" href="group__xilnvm__error__codes.html#gga00c7dbe244969a974957cec19d29f1fca3fa0a7b61dbaa0bd35d5fd250ee8aade">XNVM_EFUSE_ERR_UNLOCK</a>, <a class="el" href="group__xnvm__util__apis.html#ga0b8d44122a9957c29ed1be2574a53aed">XNvm_EfuseReadReg()</a>, and <a class="el" href="group__xnvm__util__apis.html#ga64ca5266a4e90002294937021465135a">XNvm_EfuseWriteReg()</a>.</p>

<p>Referenced by <a class="el" href="group__xnvm__util__apis.html#ga43a467daea1ce3c434d0c01e3657c0a9">XNvm_EfuseCheckAesKeyCrc()</a>, and <a class="el" href="group__xnvm__util__apis.html#ga4e019d9cd1db1fc71ae3b17f615eb8a3">XNvm_EfuseSetupController()</a>.</p>

</div>
</div>
<a class="anchor" id="ga64ca5266a4e90002294937021465135a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XNvm_EfuseWriteReg </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>BaseAddress</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>RegOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>Data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function writes the value into the given register. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BaseAddress</td><td>is the eFuse controller base address. </td></tr>
    <tr><td class="paramname">RegOffset</td><td>is the register offset from the base address. </td></tr>
    <tr><td class="paramname">Data</td><td>is the 32-bit value to be written to the register. </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="group__xnvm__efuse__server__apis.html#ga92376a9337883b186a9d6c888f7b7937">XNvm_EfuseCacheReload()</a>, <a class="el" href="group__xnvm__util__apis.html#ga43a467daea1ce3c434d0c01e3657c0a9">XNvm_EfuseCheckAesKeyCrc()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gaf62c488013d769df5cf16476d9dc04ed">XNvm_EfuseDisablePowerDown()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga0f509a4e6fbf01df3a0a5cf4e5b1920a">XNvm_EfuseEnableProgramming()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#ga48684cc917830291d61d10ec465489e1">XNvm_EfuseInitTimers()</a>, <a class="el" href="group__xnvm__util__apis.html#ga3024ec2e49b24a72d30ffd6ca24fd056">XNvm_EfuseLockController()</a>, <a class="el" href="group__xnvm__efuse__server__apis.html#gab12034723a4823aa225ddf9500fc45e7">XNvm_EfuseSetRefClk()</a>, <a class="el" href="group__xnvm__util__apis.html#ga4e019d9cd1db1fc71ae3b17f615eb8a3">XNvm_EfuseSetupController()</a>, and <a class="el" href="group__xnvm__util__apis.html#ga9c7176dc69fd682793be08de6c421d37">XNvm_EfuseUnlockController()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf8e96ff615b644f9f920a0f0e94f5da0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XNvm_ZeroizeAndVerify </td>
          <td>(</td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>DataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u32&#160;</td>
          <td class="paramname"><em>Length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is used to zeroize the memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DataPtr</td><td>Pointer to the memory which need to be zeroized. </td></tr>
    <tr><td class="paramname">Length</td><td>Length of the data in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS: If Zeroization is successful.</li>
<li>XST_FAILURE: If Zeroization is not successful. </li>
</ul>
</dd></dl>
<p>Clear the decrypted data</p>
<p>Read it back to verify</p>

<p>Referenced by <a class="el" href="group__xnvm__efuse__server__apis.html#gaac535d6758d3eccb3407e6d30acad999">XNvm_EfuseReadIv()</a>, and <a class="el" href="group__xnvm__efuse__server__apis.html#ga0c0ae462f443cc003504d85d719d816f">XNvm_EfuseReadPuf()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
